/**
 * 
 */
package com.shine.icis.hbean;

import java.io.Serializable;
import java.util.Set;

import org.apache.struts2.json.annotations.JSON;


/**
 * 报送审批流程
 * @author zsy
 *
 */
public class FlowDef implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1998411859294309098L;
	private String flowId;
	private String flowName;//流程名称
	private String actionHandler;//处理事件
	private String description;//描述
	
	private Set<FlowNode> flowNodes;//流程步骤

	public String getFlowId() {
		return flowId;
	}

	public void setFlowId(String flowId) {
		this.flowId = flowId;
	}

	public String getFlowName() {
		return flowName;
	}

	public void setFlowName(String flowName) {
		this.flowName = flowName;
	}

	public String getActionHandler() {
		return actionHandler;
	}

	public void setActionHandler(String actionHandler) {
		this.actionHandler = actionHandler;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@JSON(serialize=false)
	public Set<FlowNode> getFlowNodes() {
		return flowNodes;
	}

	public void setFlowNodes(Set<FlowNode> flowNodes) {
		this.flowNodes = flowNodes;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((flowId == null) ? 0 : flowId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final FlowDef other = (FlowDef) obj;
		if (flowId == null) {
//			if (other.flowId != null)
				return false;
		} else if (!flowId.equals(other.flowId))
			return false;
		return true;
	}

	
	
	
}

